<template>
	<div class="box">
		<activitiesThreePic :threePicData="arraydata"></activitiesThreePic>
		<div v-if="arraydata.length==0 && env === 'edit'">暂无数据</div>
	</div>
</template>

<script>
	import activitiesThreePic from "../../../components/activitiesThreePic";
	export default {
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				arraydata: []
			}
		},
		computed: {
			env() {
				return window.environment; // 获取是否是编辑状态
			},
		},
		components: {
			activitiesThreePic,
		},
		methods: {
			threedata() {
				this.arraydata = []
				let length = this.list.length < 3 ? this.list.length : 3
				for(var i = 0; i < length; i++) {
					this.arraydata.push(this.list[i])
				}
			}
		},
		created() {

		},
		watch: {
			list() {
				this.threedata()
			}
		},
		mounted() {
			this.threedata()
		}
	}
</script>

<style>

</style>